package com.hmdp.constants;

public class RedisConstants {

    //验证码
    public static final String LOGIN_CODE_KEY = "login:code:";
    public static final Long LOGIN_CODE_TTL = 5L;

    //登录凭证
    public static final String LOGIN_USER_KEY = "login:token:";
    public static final Long LOGIN_USER_TTL = 60L;

    //商户
    public static final String CACHE_SHOP_KEY = "cache:shop:";
    public static final Long CACHE_SHOP_TTL = 30L;

    //商户类型
    public static final String CACHE_SHOP_TYPE_KEY = "cache:shop-type";
    public static final Long CACHE_SHOP_TYPE_TTL = 30L;

    //商户布隆过滤器
    public static final String BLOOM_SHOP_KEY = "bloom:shop";

    //缓存空值的时间
    public static final Long CACHE_NULL_TTL = 2L;

    //商户锁
    public static final String LOCK_SHOP_KEY = "lock:shop:";
    public static final Long LOCK_SHOP_TTL = 10L;
    //获取互斥锁失败后的重试时间
    public static final Long LOCK_FAIL_TRY_TIME = 50L;

    //自增序列
    public static final String ORDER_ICR = "icr:";

    //秒杀分布式锁
    public static final String SECKILL_LOCK_KEY = "seckill:lock:";

    //秒杀库存
    public static final String SECKILL_STOCK_KEY = "seckill:stock:";
    public static final String SECKILL_ORDER_KEY = "seckill:order:";

    //笔记点赞
    public static final String BLOG_LIKED_KEY = "blog:liked:";

    //用户关注
    public static final String USER_FOLLOW_KEY = "user:follow:";
    //用户笔记收件箱
    public static final String USER_FEED_KEY = "user:feed:";
    //商铺的地理坐标
    public static final String SHOP_GEO_KEY = "shop:geo:";
    public static final String USER_SIGN_KEY = "user:sign:";
}
